#include "ThreadEncapsulation.hpp"
using namespace jlf;
int main()
{
    thread t(
        []()
        {
            int count = 5;
            while (count--)
            {
                char name[128];
                pthread_getname_np(pthread_self(), name, sizeof(name));
                printf("hello,我是一个新线程,%s\n", name);
                sleep(1);
            }
        });
        t.Start();
        sleep(5);
        t.EnAbleDetach();
        t.Detach();
        //t.Stop();
     
        t.Join();
    return 0;
}